<?php
namespace app\index\model;
use think\Model;
class Userwater extends Model
{
    protected $resultSetType = 'collection';
    public function getStatusAttr($value){
        $status = [0=>'支出',1=>'收入'];
        return $status[$value];
    }
    //查询提现记录信息
    public function AllMoney(){
        $res=$this->alias('a')
            ->join('user','user.id=a.userid')
            ->where('style',0)
            ->field('user.name,status,amount,comments,a.times')
            ->select();
        return $res;
    }
}